#include <iostream>
#include <cstring>
using namespace std;

class Person
{
protected:
  char Name[10];
  int Age;

public:
  void Register(char *name, int age)
  {
    strcpy(Name, name);
    Age = age;
    cout << "constructor of person " << Name << endl;
  }
  ~Person()
  {
    cout << "deconstructor of person " << Name << endl;
  };
  void show()
  {
    
  }
};

class Student : public Person
{
private:
  char ClassName[10];
  Person Monitor; //班长
public:
  Student(char *name, int age, char *classname, char *name1, int age1) : Person(name, age), Monitor(name1, age1) //name1 age1是班长的信息
  {
    strcpy(ClassName, classname);
    cout << "constructor of Student" << endl;
  }
  ~Student() { cout << "deconstructor of Student" << endl; };
  void show()
  {
    Person::Show();
    cout << " in " << ClassName << endl;
    cout << "Monitor: ";
    Monitor.Show();
  }
};

int main()
{
  char name[10], name1[10], classname[10];
  int age, age1;
  cin >> name >> age >> classname >> name1 >> age1;
  Student a(name, age, classname, name1, age1);
  return 0;
}
